#include <compat/tabos.h>

#include <sys/types.h>
//#include <system/drivers/block/fstypes.h>

struct sFsTypes asFsTypes[] = {
    { 0x00, "Empty" },
    { 0x01, "FAT12" },
    { 0x02, "XENIX root" },
    { 0x03, "XENIX usr" },
    { 0x04, "FAT16 <32M" },
    { 0x05, "Extended" },
    { 0x06, "FAT16" },
    { 0x07, "HPFS/NTFS" },
    { 0x08, "AIX" },
    { 0x09, "AIX bootable" },
    { 0x0A, "OS/2 Boot Manager" },
    { 0x0B, "Win95 FAT32" },
    { 0x0C, "Win95 FAT32 (LBA)" },
    { 0x0E, "Win95 FAT16 (LBA)" },
    { 0x0F, "Win95 Ext'd (LBA)" },
    { 0x10, "OPUS" },
    { 0x11, "Hidden FAT12" },
    { 0x12, "Compaq diagnostics" },
    { 0x14, "Hidden FAT16 <32MB" },
    { 0x16, "Hidden FAT16" },
    { 0x17, "Hidden HPFS/NTFS" },
    { 0x18, "AST SmartSleep" },
    { 0x1B, "Hidden Win95 FAT32" },
    { 0x1C, "Hidden Win95 FAT32 (LBA)" },
    { 0x1E, "Hidden Win95 FAT16 (LBA)" },
    { 0x24, "NEC DOS" },
    { 0x39, "Plan9" },
    { 0x3C, "PartitionMagic recovery" },
    { 0x40, "Venix 80286" },
    { 0x41, "PPC PReP Boot" },
    { 0x42, "SFS" },
    { 0x4D, "QNX4.x" },
    { 0x4E, "QNX4.x 2nd part" },
    { 0x4F, "QNX3.x 3rd part" },
    { 0x50, "OnTrack DM" },
    { 0x51, "OnTrack DM6 Aux1" },
    { 0x52, "CP/M" },
    { 0x53, "OnTrack DM6 Aux3" },
    { 0x54, "OnTrackDM6" },
    { 0x55, "EZ-Drive" },
    { 0x56, "Golden Bow" },
    { 0x5C, "Priam Edisk" },
    { 0x61, "SpeedStor" },
    { 0x63, "GNU HURD or SysV" },
    { 0x64, "Novell Netware 286" },
    { 0x65, "Novell NEtware 386" },
    { 0x70, "DiskSecure Multi-Boot" },
    { 0x75, "PC/IX" },
    { 0x80, "Old Minix" },
    { 0x81, "Minix / old Linux" },
    { 0x82, "Linux Swap" },
    { 0x83, "Linux Native" },
    { 0x84, "OS/2 hidden C: drive" },
    { 0x85, "Linux extended" },
    { 0x86, "NTFS volume set" },
    { 0x87, "NTFS volume set" },
    { 0x8E, "Linux LVM" },
    { 0x93, "Amoeba" },
    { 0x94, "Amoeba BBT" },
    { 0x9F, "BSD/OS" },
    { 0xA0, "IBM Thinkpad hibernation" },
    { 0xA5, "FreeBSD" },
    { 0xA6, "OpenBSD" },
    { 0xA7, "NeXTSTEP" },
    { 0xA8, "Darwin UFS" },
    { 0xA9, "NetBSD" },
    { 0xAB, "Darwin boot" },
    { 0xB7, "BSDI fs" },
    { 0xB8, "BSDI swap" },
    { 0xBB, "Boot Wizard hidden" },
    { 0xBE, "Solaris boot" },
    { 0xC1, "DRDOS/sec (FAT-12)" },
    { 0xC4, "DRDOS/sec (FAT-16 < 32M)" },
    { 0xC6, "DRDOS/sec (FAT-16)" },
    { 0xC7, "Syrinx" },
        { 0xD3, "Phantom" },
    { 0xDA, "Non-FS data" },
    { 0xDB, "CP/M/CTOS" },
    { 0xDE, "Dell Utility" },
    { 0xDF, "BootIt" },
    { 0xE1, "DOS access" },
    { 0xE3, "DOS R/O" },
    { 0xE4, "SpeedStor" },
    { 0xEB, "BeOS fs" },
        { 0xED, "Tabos" },
    { 0xEE, "EFI GPT" },
    { 0xEF, "EFI (FAT-12/16/32)" },
    { 0xF0, "Linux/PA-RISC boot" },
    { 0xF1, "SpeedStor" },
    { 0xF2, "DOS Secondary" },
    { 0xF4, "SpeedStor" },
    { 0xFD, "Linux raid autodetect" },
    { 0xFE, "LANstep" },
    { 0xFF, "BBT" },
    { 0x00, 0x00 }
};

sint8 *GetFsName( uint8 nId ) {
	uint32 nIndex;

	for ( nIndex = 0; nIndex < sizeof( asFsTypes ) / sizeof( asFsTypes[ 0 ] );
		nIndex++ ) {
		if ( asFsTypes[ nIndex ].nType == nId ) {
			return asFsTypes[ nIndex ].pName;
		}
	}
	return "Unknown";
}
